{layout name="main"/}
<div class="wrapper wrapper-content animated fadeInUp">
    <div class="row">
        <div class="col-sm-12">

            <div class="ibox">
                <div class="ibox-title">
                    <h5>{$title}</h5>

                </div>
                <div class="ibox-content">

                    <div class="row m-b-sm m-t-sm">


                        <div class="col-md-12">
                            <div class="input-group">
                                <input type="text" placeholder="请输入标题" class="input-sm form-control" name="keyword" value="{$keyword}"> <span class="input-group-btn">
                                <button type="button" class="btn btn-sm btn-primary" onclick="search()">搜索</button> </span>
                            </div>
                        </div>
                    </div>

                    <div class="project-list">

                        <table class="table table-striped table-bordered table-hover dataTables-example dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
                            <thead>
                                <tr role="row">

                                    <th style=" width: 70%">标题</th>
                                    <th>发布日期</th>

                                </tr>
                            </thead>
                            <tbody>
                              {:table_empty_list($list,'暂无数据!',2)}
                                {volist name="list" id="article"}
                                <tr>
                                    <td>
                                        <a{if condition="$article->is_top==1" } style="color:red" {/if} href="{:url('admin/Article/view',['id'=>$article.article_id])}">{$article->title}</a>
                                    </td>
                                    <td>
                                        {$article->create_time}
                                    </td>

                                </tr>
                                {/volist}

                            </tbody>

                        </table>


                        <div class="row">
                            <div class="col-sm-6">
                                <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">
                                    每页显示 {:getPageSize()} 项，共 {$list->toArray()['total']} 项</div>
                            </div>
                            <div class="col-sm-6">
                                <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                    {$list->render()}

                                </div>

                              </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>
<script src="js/content.min.js?v=1.0.0"></script>
<script>
    function search() {
        var keyword = $("input[name=keyword]").val();
        toUrl("{:url('admin/Article/showNews', ['type'=>$type], '')}/keyword/" + keyword);
    }
</script>
